package net.bolue.console.action;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.bolue.sysmng.db.DbOpUtil;
import net.bolue.sysmng.exception.BolueException;
import net.bolue.sysmng.tblbean.SubSys;
import net.bolue.web.mvc.AbstractAction;
import net.bolue.web.mvc.ActionResult;
import net.bolue.web.report.RepConstants;

/**
 * 获得子系统
 * @author Administrator
 *
 */
public class SelSubSys extends AbstractAction{

	@Override
	public ActionResult perform(HttpServletRequest request,
			HttpServletResponse response) throws BolueException {
		DbOpUtil dbOpUtil = new DbOpUtil(RepConstants.SYSMNG_SUBSYS_KEY);
		List<SubSys> subSysList = dbOpUtil.query(SubSys.class, "st_subsys", null, null, null);
		ActionResult actionResult = new ActionResult();
		Map<String,Object> pageMap = new HashMap<String,Object>();
		pageMap.put("rows", subSysList);
		actionResult.setData(pageMap);
		actionResult.setResult(true);
		return actionResult;
	}

}
